import request from '@/config/axios'

// 生活圈-商铺-返利算法的返利详细记录 VO
export interface CircleStoreRebateRecordVO {
  id: number // 记录ID
  meberId: string // 会员编号
  memberName: string // 会员名称
  points: number // 消耗积分
  rebatePrice: number // 返利金额
  batchId: string // 批次号
  currentRebateRound: number // 当前返利期数
  coupId: number // 优惠券业务号
  allRebates: string // 当前轮所有期数返利信息
}

// 生活圈-商铺-返利算法的返利详细记录 API
export const CircleStoreRebateRecordApi = {
  // 查询生活圈-商铺-返利算法的返利详细记录分页
  getCircleStoreRebateRecordPage: async (params: any) => {
    return await request.get({ url: `/trade/circle-store-rebate-record/page`, params })
  },

  // 查询生活圈-商铺-返利算法的返利详细记录详情
  getCircleStoreRebateRecord: async (id: number) => {
    return await request.get({ url: `/trade/circle-store-rebate-record/get?id=` + id })
  },

  // 新增生活圈-商铺-返利算法的返利详细记录
  createCircleStoreRebateRecord: async (data: CircleStoreRebateRecordVO) => {
    return await request.post({ url: `/trade/circle-store-rebate-record/create`, data })
  },

  // 修改生活圈-商铺-返利算法的返利详细记录
  updateCircleStoreRebateRecord: async (data: CircleStoreRebateRecordVO) => {
    return await request.put({ url: `/trade/circle-store-rebate-record/update`, data })
  },

  // 删除生活圈-商铺-返利算法的返利详细记录
  deleteCircleStoreRebateRecord: async (id: number) => {
    return await request.delete({ url: `/trade/circle-store-rebate-record/delete?id=` + id })
  },

  // 导出生活圈-商铺-返利算法的返利详细记录 Excel
  exportCircleStoreRebateRecord: async (params) => {
    return await request.download({ url: `/trade/circle-store-rebate-record/export-excel`, params })
  },
}
